class ChatRecord {
  String id;
  String sender; //发送者id
  String receiver; //接收者id
  String content; //信息内容
  String time; //发送时间
  String isRead;

  ChatRecord(this.id, this.sender, this.receiver, this.content, this.time,
      this.isRead);

  static ChatRecord formMap(Map<String, dynamic> map) {
    ChatRecord record = ChatRecord(
        map['id'].toString(),
        map['senderId'].toString(),
        map['receiverId'].toString(),
        map['content'],
        map['time'],
        map['isRead']);
    return record;
  }

  void setIsRead() {
    this.isRead = "1";
  }
}
